<?php 
require_once "1_utilities.inc.php";


$dbhost = "localhost";
$dbname = "multiplayer";
$dbuser = "saknis";
$dbpass = "ziedai";


mysql_connect("$dbhost", "$dbuser", "$dbpass") or die(mysql_error());
mysql_select_db("$dbname") or die(mysql_error());


function sql_set($query){
	myprint($query);
	$result = mysql_query($query) or die(mysql_error());
	return $result;
}

function sql_get($query){
	myprint($query);
	$rows = array();
	$result = mysql_query($query) or die(mysql_error());
	$row = mysql_fetch_assoc($result);
	while ($row)
		{		$rows[] = $row;
				$row = mysql_fetch_assoc($result);
		}	
	return $rows;
}

?>
